<?php
/*
Template Name: Brand Landing Page
*/
?>

<?php
	global $productbrand, $productbrandimage, $productbrandblurb;
	$productbrand = get_post_meta($post->ID, 'productbrand', true);
	$productbrandimage = get_post_meta($post->ID, 'productbrandimage', true);
	$productbrandblurb = get_post_meta($post->ID, 'productbrandblurb', true);
?>

<style>
    .yarpp-related { display:none; }
</style>

<?php get_header(); ?>
<?php global $woo_options; ?>
       
    <div id="content" class="page col-full">
		<div id="main" class="col-left">
		           
		<?php if ( $woo_options[ 'woo_breadcrumbs_show' ] == 'true' ) { ?>
			<?php woo_breadcrumbs(); ?>  
		<?php } ?>  			

        <?php if (have_posts()) : $count = 0; ?>
        <?php while (have_posts()) : the_post(); $count++; ?>
                                                                    
            <div <?php post_class(); ?>>

			    <h1 class="title"><?php the_title(); ?></h1>
                            <?php include '/home/silicons/public_html/wp-content/themes/woostore/page-include-social-block.php'; ?>

                <div class="entry">
                    
                    <div style="float:right;margin:0px;margin-left:20px;margin-bottom:10px;border:#cccccc 1px solid;">
                        <?php if($productbrandimage != none) { ?>
                            <img src="/../<?php echo $productbrandimage ; ?>" alt="<?php echo $productbrand ; ?> Products" width="250" />
                        <?php } else { ?>
                            <img src="/../wp-content/themes/woostore/images/siliconsolar-logo300.jpg" alt="<?php echo $productbrand ; ?> Products" width="250" />
                        <?php } ?>
                </div>
                
                <p style="line-height:16px;">
                	<?php echo $productbrandblurb ; ?>
                </p>
                
                <div style="width:100%;height:1px;background:#cccccc;margin-top:10px;margin-bottom:20px;clear:both;"></div>
                
                <?php include 'page-include-brandpageproductcode.php' ; ?>
                
                <?php include 'custom-function-documents-by-brand.php' ; ?>
                
                <?php the_content(); ?>
                
                    <?php // Include The Contact Block - If Option Is Turned On - Matt B - Apr 2013
                            if (get_field('showcontactblock')) {
                                echo do_shortcode('[contact]');
                        } ?>
                    
                    <?php include 'page-include-why-shop-block.php'; ?>

					<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); ?>
               	</div><!-- /.entry -->

				<?php edit_post_link( __( '{ Edit }', 'woothemes' ), '<span class="small">', '</span>' ); ?>
                
            </div><!-- /.post -->
            
            <?php $comm = $woo_options[ 'woo_comments' ]; if ( ($comm == "page" || $comm == "both") ) : ?>
                <?php comments_template(); ?>
            <?php endif; ?>
                                                
		<?php endwhile; else: ?>
			<div <?php post_class(); ?>>
            	<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ) ?></p>
            </div><!-- /.post -->
        <?php endif; ?>  
        
		</div><!-- /#main -->

        <?php get_sidebar(); ?>

    </div><!-- /#content -->
		
<?php get_footer(); ?>